#{extends 'relationsHome.html' /}
#{set title:'Home' /}
#{set title:'Relation' /}

#{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}"
	media="screen">

#{/set}

<form action="@{Relations.addTopicRelation()}" method="POST">
<br/>
<tr><td><b>Topics Relation Creation</b><hr></hr></td></tr>

<p>
Source
#{if topic.size() > 0 }
#{select 'source', value:1, id:'select1'}
   #{option None}None#{/option}
    #{list items:0..topic.size()-1, as:'i'}
      #{option topic.get(i).title}${topic.get(i).title}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Topics
#{/else}
</p>

<p>
Name
#{if task.size() > 0 }
    #{select 'relationName', value:1, id:'select2'}
    #{option None}None#{/option}
    #{list items:0..task.size()-1, as:'i'}
    #{option task.get(i).relationName} ${task.get(i).relationName} #{/option}
    #{/list}
    #{/select}
#{/if}
#{else}
    No Relation Names
#{/else}
</p>

<p>
Destination
#{if topic.size() > 0 }
#{select 'destination', value:1, id:'select3'}
      #{option None}None#{/option}
    #{list items:0..topic.size()-1, as:'i'}
      #{option topic.get(i).title}${topic.get(i).title}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Topics
#{/else}
</p>
#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}

<tr><td>&nbsp;</td><td><input type="submit" value="Add">
</form>
